package org.example.clouddemo.service.common;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.example.clouddemo.bean.common.dto.ProductDTO;
import org.example.clouddemo.bean.common.entity.Product;
import com.baomidou.mybatisplus.extension.service.IService;
import org.example.clouddemo.bean.common.param.UpdateProductParam;
import org.example.clouddemo.bean.common.vo.ProductVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* <p>
* 产品表 服务类
* </p>
*
* @author hzg
* @since 2025-06-07
*/

public interface ProductService extends IService<Product> {
    IPage selectPageVo(Page page);

    Product selectOne(Product product);

    int create(ProductDTO productDTO, MultipartFile file, HttpServletRequest request);

    int update(UpdateProductParam param, MultipartFile file, HttpServletRequest request);

    int delete(String id,  boolean flag);

    // 在 ProductService 接口中新增方法
    List<ProductVO> recommendProducts(Long productId);
}
